package com.sumainfor.pc.market.controller.tenant;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.service.tenant.TcmktWorderEvaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 *  租赁预约评价
 * <p>
 *
 * @author: zhoucong
 * @create: 2019-05-27 15:51
 **/
@Controller
@RequestMapping("/tenant/key/worderEva")
public class TcmktWorderEvaController {

    @Autowired
    TcmktWorderEvaService tcmktWorderEvaService;

    /**
    * <p>
    * 增加租赁预约评价
    * </p>
    *
    * @author: zhoucong
    * @since:
    */
    @ResponseBody
    @PostMapping("/AddWorderEva")
    public JsonResult AddWorderEva(@RequestBody Map<String,Object> params){
        return tcmktWorderEvaService.AddWorderEva(params);
    }

    /**
    * <p>
    * 获取租赁评价分类
    * </p>
    *
    * @author: zhoucong
    * @since:
    */
    @ResponseBody
    @GetMapping("/getWordEvaTmp")
    public JsonResult getWordEvaTmp(){
        return tcmktWorderEvaService.getWordEvaTmp();
    }

    /**
    * <p>
    * 判断是否评价
    * </p>
    *
    * @author: zhoucong
    * @since:
    */
    @ResponseBody
    @PostMapping("/getWorderEvaCount")
    public JsonResult getWorderEvaCount(@RequestBody Map<String,Object> params){
        return tcmktWorderEvaService.getWorderEvaCount(params);
    }
}
